<script>
import '../assets/plugins/fontawesome-free/css/all.min.css';
// <!-- 载入脚本 -->
// <!-- jQuery -->
import '../assets/plugins/jquery/jquery.min.js';
// <!-- Bootstrap -->
import '../assets/plugins/bootstrap/js/bootstrap.bundle.min.js';

  export default {
    name:"Aside",
    data(){
      return{
        isCollapse:false
      }
    },
    methods:{

    },
    computed:{
      "menu":{
        get(){
          return this.$store.state.menu
        }
      }
    }
  }
</script>

<template>
  <div>
    <el-menu
        :default-openeds="['0']"
        :collapse="isCollapse"
        :collapse-transition="false"
        active-text-color="#409EFF"
        style="height: 100%;"
        router
    >
      <el-menu-item index="Home">
        <i class="el-icon-s-home"></i>
        <span>首页</span></el-menu-item>
      <template v-for="item in menu">
        <el-submenu :key="item.number" :index="item.number">
          <template slot="title"> <i :class="item.icon"></i> {{ item.name }}</template>
          <el-menu-item v-for="child in item.children" :key="child.number" :index="child.url">
            <i :class="child.icon"></i>
            {{ child.name }}
          </el-menu-item>
        </el-submenu>
      </template>
    </el-menu>
  </div>
</template>

<style scoped>

</style>